extern bit bit_pantalla_2_auto;
extern bit bit_pantalla_2_manual;
extern bit bit_pantalla_2_editar;
extern bit bit_pantalla_3_frec;
extern bit bit_pantalla_3_mod;
extern bit bit_pantalla_3_timer;
extern long frecuencia_guardada;
extern long tiempo_guardado;
extern long modulacion_guardada;
extern bit bit_pantalla_3_auto_1;
extern bit bit_pantalla_3_auto_2;
extern bit bit_pantalla_3_auto_3;
extern bit bit_pantalla_3_auto_4;
extern bit bit_parpadeo_cursor;
extern bit bit_pantalla_editar_1;
extern bit bit_pantalla_editar_2;
extern bit bit_pantalla_editar_3;
extern bit bit_pantalla_editar_4;

void pantalla_1(void){
GotoxyLcd (1,2);
WriteStrLcd ("     SEAKIT     ");			// escribe en la primer linea la palabra Hola
GotoxyLcd (1,1);
WriteStrLcd ("MICRO5  PLATINUM");		// escribe en la segunda linea la palabra apuntada por la variable pantalla
return;
}

void pantalla_2(void){
GotoxyLcd (1,1);
WriteStrLcd (" >AUTOMATICO    ");			// escribe en la primer linea la palabra Hola
GotoxyLcd (1,2);
WriteStrLcd ("  MANUAL  EDITAR");		// escribe en la segunda linea la palabra apuntada por la variable pantalla
return;
}

void pantalla_2_cambia(unsigned char cursor){

if (cursor==0)
	{
	GotoxyLcd (2,1);
	WriteStrLcd (">");
	GotoxyLcd (2,2);
	WriteStrLcd (" ");
	GotoxyLcd (10,2);
	WriteStrLcd (" ");
	bit_pantalla_2_auto=1;
	bit_pantalla_2_manual=0;
	bit_pantalla_2_editar=0;
	}
else if(cursor==1)
	{
	GotoxyLcd (2,1);
	WriteStrLcd (" ");
	GotoxyLcd (2,2);
	WriteStrLcd (">");
	GotoxyLcd (10,2);
	WriteStrLcd (" ");
	bit_pantalla_2_auto=0;
	bit_pantalla_2_manual=1;
	bit_pantalla_2_editar=0;
	}
else if(cursor==2)
	{
	GotoxyLcd (2,1);
	WriteStrLcd (" ");
	GotoxyLcd (2,2);
	WriteStrLcd (" ");
	GotoxyLcd (10,2);
	WriteStrLcd (">");
	bit_pantalla_2_auto=0;
	bit_pantalla_2_manual=0;
	bit_pantalla_2_editar=1;
	}


return;
}

void pantalla_3_cambia(unsigned char cursor2){

if (cursor2==0)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (">");
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (11,2);
	WriteStrLcd (" ");
	bit_pantalla_3_frec=1;
    bit_pantalla_3_mod=0;
    bit_pantalla_3_timer=0;
	}
else if(cursor2==1)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (" ");
	GotoxyLcd (1,2);
	WriteStrLcd (">");
	GotoxyLcd (11,2);
	WriteStrLcd (" ");
	bit_pantalla_3_frec=0;
    bit_pantalla_3_mod=1;
    bit_pantalla_3_timer=0;
	}
else if(cursor2==2)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (" ");
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (11,2);
	WriteStrLcd (">");
	bit_pantalla_3_frec=0;
    bit_pantalla_3_mod=0;
    bit_pantalla_3_timer=1;
	}

return;
}

void pantalla_3_cambia_progs(unsigned char cursor2){

if (cursor2==0)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (">");
	GotoxyLcd (5,1);
	WriteStrLcd (" ");
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (11,2);
	WriteStrLcd (" ");
	bit_pantalla_editar_1=1;
    bit_pantalla_editar_2=0;
    bit_pantalla_editar_3=0;
    bit_pantalla_editar_4=0;
    }
else if(cursor2==1)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (" ");
	GotoxyLcd (5,1);
	WriteStrLcd (">");
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (11,2);
	WriteStrLcd (" ");
	bit_pantalla_editar_1=0;
    bit_pantalla_editar_2=1;
    bit_pantalla_editar_3=0;
    bit_pantalla_editar_4=0;
    }
else if(cursor2==2)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (" ");
	GotoxyLcd (5,1);
	WriteStrLcd (" ");
	GotoxyLcd (1,2);
	WriteStrLcd (">");
	GotoxyLcd (11,2);
	WriteStrLcd (" ");
	bit_pantalla_editar_1=0;
    bit_pantalla_editar_2=0;
    bit_pantalla_editar_3=1;
    bit_pantalla_editar_4=0;
    }
else if(cursor2==3)
	{
	GotoxyLcd (1,1);
	WriteStrLcd (" ");
	GotoxyLcd (5,1);
	WriteStrLcd (" ");
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (11,2);
	WriteStrLcd (">");
	bit_pantalla_editar_1=0;
    bit_pantalla_editar_2=0;
    bit_pantalla_editar_3=0;
    bit_pantalla_editar_4=1;
    }

return;
}


void pantalla_3_auto(void){
GotoxyLcd (1,1);
WriteStrLcd ("RUTINA   ELEGIDA");
GotoxyLcd (1,2);
WriteStrLcd (">P + P + P + P  ");
return;
}

void pantalla_3_auto_cambia(unsigned char cursor2){

T0IE=1;          
GIE=1;

		
if (cursor2==0)
	{
	GotoxyLcd (1,2);
	WriteStrLcd (">");
	GotoxyLcd (5,2);
	WriteStrLcd (" ");
	GotoxyLcd (9,2);
	WriteStrLcd (" ");
	GotoxyLcd (13,2);
	WriteStrLcd (" ");
	bit_pantalla_3_auto_1=1;
    bit_pantalla_3_auto_2=0;
    bit_pantalla_3_auto_3=0;
    bit_pantalla_3_auto_4=0;
    }
else if(cursor2==1)
	{
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (5,2);
	WriteStrLcd (">");
	GotoxyLcd (9,2);
	WriteStrLcd (" ");
	GotoxyLcd (13,2);
	WriteStrLcd (" ");
	bit_pantalla_3_auto_1=0;
    bit_pantalla_3_auto_2=1;
    bit_pantalla_3_auto_3=0;
    bit_pantalla_3_auto_4=0;
    }
else if(cursor2==2)
	{
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (5,2);
	WriteStrLcd (" ");
	GotoxyLcd (9,2);
	WriteStrLcd (">");
	GotoxyLcd (13,2);
	WriteStrLcd (" ");
	bit_pantalla_3_auto_1=0;
    bit_pantalla_3_auto_2=0;
    bit_pantalla_3_auto_3=1;
    bit_pantalla_3_auto_4=0;
    }
else if(cursor2==3)
	{
	GotoxyLcd (1,2);
	WriteStrLcd (" ");
	GotoxyLcd (5,2);
	WriteStrLcd (" ");
	GotoxyLcd (9,2);
	WriteStrLcd (" ");
	GotoxyLcd (13,2);
	WriteStrLcd (">");
	bit_pantalla_3_auto_1=0;
    bit_pantalla_3_auto_2=0;
    bit_pantalla_3_auto_3=0;
    bit_pantalla_3_auto_4=1;
    }
return;
}


void pantalla_3_manual(void){
GotoxyLcd (1,1);
WriteStrLcd (">FREC:   ");
GotoxyLcd (13,1);
WriteStrLcd (" Hz  ");
GotoxyLcd (1,2);
WriteStrLcd (" MOD:x,xx  T:xx'");
GotoxyLcd (9,2);
WriteByteLcd (0x22,1);
return;
}


void pantalla_3_editar(void){
GotoxyLcd (1,1);
WriteStrLcd (">P1  FREC:   ");
GotoxyLcd (14,1);
WriteStrLcd (" Hz");
GotoxyLcd (1,2);
WriteStrLcd (" MOD: ,    T:  '");
GotoxyLcd (9,2);
WriteByteLcd (0x22,1);
return;
}

void pantalla_emision(void){
GotoxyLcd (1,2);
WriteStrLcd ("RESTAN:  XX MINS");
return;
}
